<?php

// src/Salgamos/BackendBundle/Entity/Location.php
namespace Salgamos\BackendBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity(repositoryClass="Salgamos\BackendBundle\Repository\LocationRepository")
 * @ORM\Table(name="location")
 */
class Location
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     * @var type 
     */
    private $id;

    /**
     * @ORM\Column(type="string", length=255)
     * @var type 
     */
    private $name;

    /**
     *@ORM\Column(type="text")
     * @var type 
     */
    private $description;

    /**
     * @ORM\Column(type="string", length=255)
     * @var type 
     */
    private $address;

    /**
     * @ORM\Column(type="string", length=255)
     * @var type 
     */
    private $coordinates;
    
    /**
     * @ORM\Column(type="string", length=255)
     * @var type 
     */
    private $image;
    
    /**
     * @ORM\Column(name="contact_name", type="string", length=255)
     * @var type 
     */
    private $contactName;
    
    /**
     * @ORM\Column(name="contact_email",type="string", length=255)
     * @var type 
     */
    private $contactEmail;
    
    /**
     * @ORM\Column(name="contact_phonenumber",type="string", length=255)
     * @var type 
     */
    private $contactPhonenumber;
    
    /**
     * @ORM\OneToMany(targetEntity="Image", mappedBy="location")
     */
    private $images;
    
    /**
     * @ORM\ManyToMany(targetEntity="Subcategory", inversedBy="locations")
     * @ORM\JoinTable(name="locations_subcategories",
     *      joinColumns={@ORM\JoinColumn(name="location_id", referencedColumnName="id")},
     *      inverseJoinColumns={@ORM\JoinColumn(name="subcategory_id", referencedColumnName="id")}
     *      )
     */
    private $subcategories;
    
    
    /**
     * @ORM\ManyToMany(targetEntity="Tag", inversedBy="locations")
     * @ORM\JoinTable(name="locations_tags",
     *      joinColumns={@ORM\JoinColumn(name="location_id", referencedColumnName="id")},
     *      inverseJoinColumns={@ORM\JoinColumn(name="tag_id", referencedColumnName="id")}
     *      )
     */
    private $tags;

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set name
     *
     * @param string $name
     * @return Location
     */
    public function setName($name)
    {
        $this->name = $name;
    
        return $this;
    }

    /**
     * Get name
     *
     * @return string 
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set description
     *
     * @param string $description
     * @return Location
     */
    public function setDescription($description)
    {
        $this->description = $description;
    
        return $this;
    }

    /**
     * Get description
     *
     * @return string 
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Set address
     *
     * @param string $address
     * @return Location
     */
    public function setAddress($address)
    {
        $this->address = $address;
    
        return $this;
    }

    /**
     * Get address
     *
     * @return string 
     */
    public function getAddress()
    {
        return $this->address;
    }

    /**
     * Set coordinates
     *
     * @param string $coordinates
     * @return Location
     */
    public function setCoordinates($coordinates)
    {
        $this->coordinates = $coordinates;
    
        return $this;
    }

    /**
     * Get coordinates
     *
     * @return string 
     */
    public function getCoordinates()
    {
        return $this->coordinates;
    }

    /**
     * Set image
     *
     * @param string $image
     * @return Location
     */
    public function setImage($image)
    {
        $this->image = $image;
    
        return $this;
    }

    /**
     * Get image
     *
     * @return string 
     */
    public function getImage()
    {
        return $this->image;
    }

    /**
     * Set contactName
     *
     * @param string $contactName
     * @return Location
     */
    public function setContactName($contactName)
    {
        $this->contactName = $contactName;
    
        return $this;
    }

    /**
     * Get contactName
     *
     * @return string 
     */
    public function getContactName()
    {
        return $this->contactName;
    }

    /**
     * Set contactEmail
     *
     * @param string $contactEmail
     * @return Location
     */
    public function setContactEmail($contactEmail)
    {
        $this->contactEmail = $contactEmail;
    
        return $this;
    }

    /**
     * Get contactEmail
     *
     * @return string 
     */
    public function getContactEmail()
    {
        return $this->contactEmail;
    }

    /**
     * Set contactPhonenumber
     *
     * @param string $contactPhonenumber
     * @return Location
     */
    public function setContactPhonenumber($contactPhonenumber)
    {
        $this->contactPhonenumber = $contactPhonenumber;
    
        return $this;
    }

    /**
     * Get contactPhonenumber
     *
     * @return string 
     */
    public function getContactPhonenumber()
    {
        return $this->contactPhonenumber;
    }

    /**
     * Add images
     *
     * @param \Salgamos\BackendBundle\Entity\Image $images
     * @return Location
     */
    public function addImage(\Salgamos\BackendBundle\Entity\Image $images)
    {
        $this->images[] = $images;
    
        return $this;
    }

    /**
     * Remove images
     *
     * @param \Salgamos\BackendBundle\Entity\Image $images
     */
    public function removeImage(\Salgamos\BackendBundle\Entity\Image $images)
    {
        $this->images->removeElement($images);
    }

    /**
     * Get images
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getImages()
    {
        return $this->images;
    }

    /**
     * Add tags
     *
     * @param \Salgamos\BackendBundle\Entity\Tag $tags
     * @return Location
     */
    public function addTag(\Salgamos\BackendBundle\Entity\Tag $tags)
    {
        $this->tags[] = $tags;
    
        return $this;
    }

    /**
     * Remove tags
     *
     * @param \Salgamos\BackendBundle\Entity\Tag $tags
     */
    public function removeTag(\Salgamos\BackendBundle\Entity\Tag $tags)
    {
        $this->tags->removeElement($tags);
    }

    /**
     * Get tags
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getTags()
    {
        return $this->tags;
    }

    /**
     * Add subcategories
     *
     * @param \Salgamos\BackendBundle\Entity\Subcategory $subcategories
     * @return Location
     */
    public function addSubcategorie(\Salgamos\BackendBundle\Entity\Subcategory $subcategories)
    {
        $this->subcategories[] = $subcategories;
    
        return $this;
    }

    /**
     * Remove subcategories
     *
     * @param \Salgamos\BackendBundle\Entity\Subcategory $subcategories
     */
    public function removeSubcategorie(\Salgamos\BackendBundle\Entity\Subcategory $subcategories)
    {
        $this->subcategories->removeElement($subcategories);
    }

    /**
     * Get subcategories
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getSubcategories()
    {
        return $this->subcategories;
    }
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->images = new \Doctrine\Common\Collections\ArrayCollection();
        $this->subcategories = new \Doctrine\Common\Collections\ArrayCollection();
        $this->tags = new \Doctrine\Common\Collections\ArrayCollection();
    }
    
}